import {
	get,
	post,
	postBody,
	getNoAuth,
	postNoAuth,
	postBodyNoAuth
} from '@/common/js/request.js'
import {
	config
} from '@/config'

export const uploadFile = `${config.baseApi}/upload/file`

// 分页获取文件数据
export const getFileList = (params) => {
	return get('/file/user/getByCondition', params)
}
// 用户文件回收站操作
export const trashFile = (params) => {
	return post('/file/user/trash', params)
}
// 用户收藏文件
export const collectFile = (params) => {
	return post('/file/user/collect', params)
}
// 用户重命名文件
export const renameFile = (params) => {
	return post('/file/user/rename', params)
}
// 用户复制文件
export const copyFile = (params) => {
	return post('/file/user/copy', params)
}
// 用户删除文件
export const deleteFile = (params) => {
	return post('/file/user/delete', params)
}
// 用户清空回收站文件
export const clearTrashFile = (params) => {
	return get('/file/user/clearTrash', params)
}

// 加载类别子级数据
export const loadFileCate = (params) => {
    return get(`/fileCategory/getByCondition`, params)
}
// 用户新建文件夹
export const addFileCate = (params) => {
	return post('/fileCategory/add', params)
}
// 用户文件回收站操作
export const trashFileCate = (params) => {
	return post('/fileCategory/trash', params)
}
// 用户收藏文件夹
export const collectFileCate = (params) => {
	return post('/fileCategory/collect', params)
}
// 用户重命名文件夹
export const renameFileCate = (params) => {
	return post('/fileCategory/rename', params)
}
// 用户删除文件夹
export const delFileCateByIds = (params) => {
	return post('/fileCategory/delByIds', params)
}
// 用户清空回收站文件夹
export const clearTrashFileCate = (params) => {
	return get('/fileCategory/clearTrash', params)
}
